package org.example.factory.messagequeue;

import cn.hutool.core.util.IdUtil;
import org.example.model.messagequeue.Combat;

import java.time.LocalDateTime;

/**
 * @author huangy
 * @description
 * @since 2022/11/10 17:02
 **/
public class CombatFactory {

    /*
     * @description 创建战斗
     * @author huangy
     * @since 2022/11/10 17:03
     * @return org.example.model.messagequeue.Combat
     **/
    public static Combat createCombat() {
        Combat combat = new Combat();
        //雪花id
        combat.setId(IdUtil.getSnowflakeNextId());
        combat.setRoom(RoomFactory.createRoom());
        combat.setCommand("test command");
        combat.setTime(LocalDateTime.now());
        return combat;
    }

    private CombatFactory() {
        throw new UnsupportedOperationException();
    }

}
